Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new_session, write_permission args #1476

Merged
merged 4 commits into from
May 17, 2023
Merged

Add new_session, write_permission args #1476

merged 4 commits into from
May 17, 2023

Conversation

aliabid94
Copy link
Contributor

@aliabid94 aliabid94 commented May 16, 2023

Add two kwargs to login:

  • new_session - if True, forces the user to login, even if a token is cached in HfFolder
  • write_permission - required a write access token, raises Exception if not provided
    Also add_to_git_credentials was not being respected from login to interpreter_login and notebook_login, would prompt for value. Fixed

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 16, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this and opening the PR @aliabid94!

Hope you don't mind but I took the opportunity to remove the legacy _is_valid_token that was used only once internally. I also added get_token_permission that I wanted to implement since quite some time now 😄

@Wauplin Wauplin merged commit 0f0cc40 into main May 17, 2023
@Wauplin Wauplin deleted the new_login_kwargs branch May 17, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants